{% load static %}
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>编辑文章分类</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="{% static 'background/css/font.css' %}">
    <link rel="stylesheet" href="{% static 'background/css/weadmin.css' %}">
</head>

<body>
<div class="weadmin-body">

    <form id="form1" class="layui-form">
        <div class="layui-tab">
            <ul class="layui-tab-title">
                <li class="layui-this">基本设置</li>
                <li>栏目模板</li>
                <li>栏目简介</li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <!--tab1 content-->
                    <div class="layui-form-item">
                        <label class="layui-form-label">父级分类</label>
                        <div class="layui-input-inline">
                            <select name="pid" id="pid-select" lay-verify="required" lay-filter="pid-select">
                                <option value="0" data-level="0">顶级分类</option>
                                <option value="1" data-level="0">内容管理</option>
                                <option value="2" data-level="1">文章管理</option>
                                <option value="3" data-level="2">文章列表</option>
                                <option value="4" data-level="2">文章分类</option>
                                <option value="5" data-level="2">标签管理</option>
                                <option value="6" data-level="0">产品管理</option>
                                <option value="7" data-level="1">产品列表</option>
                                <option value="8" data-level="1">产品分类</option>
                                <option value="9" data-level="1">品牌管理</option>
                            </select>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">分类名称</label>
                        <div class="layui-input-block">
                            <input type="text" name="title" lay-verify="required" jq-error="请输入分类名称"
                                   placeholder="请输入分类名称" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">栏目别名</label>
                        <div class="layui-input-block">
                            <input type="text" name="cname" lay-verify="required" jq-error="请输入栏目别名"
                                   placeholder="请输入栏目别名" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">栏目缩略图</label>
                        <div class="layui-input-block">
                            <button type="button" class="layui-btn layui-btn-primary" id="topicImg"><i
                                    class="layui-icon">&#xe67c;</i>上传图片
                            </button>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">排序</label>
                        <div class="layui-input-inline">
                            <input type="text" name="order" lay-verify="number" value="100" jq-error="排序必须为数字"
                                   placeholder="分类排序" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">状态</label>
                        <div class="layui-input-inline">
                            <input type="radio" name="switch" title="启用" value="1" checked/>
                            <input type="radio" name="switch" title="禁用" value="0"/>
                        </div>
                    </div>
                    <!--//tab1 content-->
                </div>
                <div class="layui-tab-item">
                    <!--tab2 content-->
                    <div class="layui-form-item">
                        <label class="layui-form-label">栏目类型</label>
                        <div class="layui-input-block">
                            <input type="radio" name="type" title="频道" value="0" checked/>
                            <input type="radio" name="type" title="单页" value="1"/>
                            <input type="radio" name="type" title="外链" value="2"/>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">外链地址</label>
                        <div class="layui-input-block">
                            <input type="text" name="topicLink" lay-verify="required" jq-error="请输入栏目跳转网址"
                                   placeholder="请输入栏目跳转网址" autocomplete="off" class="layui-input ">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">栏目模板</label>
                        <div class="layui-input-block">
                            <div class="layui-input-inline">
                                <input type="text" name="topicModel" lay-verify="required" jq-error="请选择栏目模板"
                                       placeholder="请选择栏目模板" autocomplete="off" class="layui-input ">
                            </div>
                            <button type="button" class="layui-btn layui-btn-primary" id="topicModelBtn">选择文件</button>
                        </div>
                    </div>

                    <!--//tab2 content-->
                </div>
                <div class="layui-tab-item">
                    <!--tab3 content-->
                    <textarea id="topicBody" style="display: none;"></textarea>
                    <!--//tab3 content-->
                </div>

            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" id="editTopic" lay-submit="" lay-filter="add">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
        <input type="hidden" name="level" value="0"/>
    </form>
</div>
<script src="{% static 'background/lib/layui/layui.js' %}" charset="utf-8"></script>
<script src="{% static 'background/js/article/category-edit.js' %}" type="text/javascript" charset="utf-8"></script>
</body>

</html>